z<%-- <%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %> --%>
<%@ taglib uri="http://www.springframework.org/security/tags" prefix="s" %>
<%@taglib prefix="m" uri="http://www.springframework.org/tags" %>
<%
String ctxpath = request.getContextPath();
String baseFullPath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+ctxpath+"/";
%>
<%-- <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>  
<sec:authorize access="hasRole('supervisor')"></sec:authorize>        
<sec:authorize url="/admin"></sec:authorize>  
<!-- 允许访问当前的Authentication 对象， 保存在安全上下文中 如果Authentication 的principal  SecurityContextHolder.getContext().getAuthentication()  -->   
<sec:authentication property="principal.username" />  
<!-- Security ACL 模块时才可以使用。它检测一个用逗号分隔的特定领域对象的需要权限列表。如果当前用户拥有这些权限的任何一个，标签内容就会被执行。 -->
<sec:accesscontrollist hasPermission="1,2" domainObject="${someObject}"></sec:accesscontrollist>     --%> 
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 
<!DOCTYPE html>
<html lang="zh"> 
	<head>
		<meta charset="utf-8">
		<title>资产证券化管理后台</title>
		<%@include file="../commons/_meta.jsp" %>
		<base href="${ctx}">
		<script type="text/javascript">
			var ctx="${ctx}";
		</script> 
		<link rel="stylesheet" href="${ctx}assets/admin/css/global.css" /> 
		<link rel="stylesheet" href="${ctx}assets/plugins/font-awesome/latest/css/font-awesome.min.css">
	</head>
	<body>
		<div class="layui-layout layui-layout-admin">
			<div class="layui-header header header-demo">
				<div class="layui-main">
					<div class="admin-login-box">
						<a class="logo" style="left: 0;" href="xxxx">
							<span style="font-size: 22px;"><fmt:message key="Asset.Backed.Securitization"/></span>
						</a>
						<div class="admin-side-toggle">
							<i class="fa fa-bars" aria-hidden="true"></i>
						</div>
					</div>
					<ul class="layui-nav admin-header-item">
						<li class="layui-nav-item" id="	">
							<a href="http://www.baidu.com" target="_blank"><fmt:message key="preview"/></a>
						</li>
						<li class="layui-nav-item">
							<a href="javascript:;" class="admin-header-user">
								<m:message code="welcome"/>
								<span>
								<s:authentication property="principal.username"></s:authentication>
								<%-- <shiro:authenticated>${sessionScope.SESSION_USER.sessionUserName }</shiro:authenticated> --%>
								</span>
								<i class="fa fa-user-o" aria-hidden="true"></i>
								<%-- <shiro:hasRole name="administrator">    
								    <a href="admin.jsp">Administer the system</a>    
								</shiro:hasRole>  
								<shiro:hasPermission name="user:create">    
								    <a href="createUser.jsp">Create a new User</a>    
								</shiro:hasPermission>    --%>
							</a>
							<dl class	="layui-nav-child">
								<dd>
									<a href="javascript:;" onclick="popwindow('<fmt:message key="Personal.information"/>','${ctx}admin/adminuser/info',600,400)" ><i class="fa fa-user-circle" aria-hidden="true"></i><fmt:message key="Personal.information"/></a>
								</dd>
								<!-- <dd>
									<a href="javascript:;"><i class="fa fa-gear" aria-hidden="true"></i>个人设置</a>
								</dd> -->
								<dd>
									<a href="javascript:;" onclick="popwindow('<fmt:message key="Change.the.password"/>','${ctx}admin/adminuser/resetpwd',600,400)" ><i class="fa fa-gear" aria-hidden="true"></i><fmt:message key="Change.the.password"/></a>
								</dd>
								<dd>
									<a href="${ctx}admin/logout/"><i class="fa fa-sign-out" aria-hidden="true"></i><fmt:message key="log.down"/></a>
								</dd>
							</dl>
						</li>
					</ul>
					<ul class="layui-nav admin-header-item-mobile">
						<li class="layui-nav-item">
							<a href="${ctx}admin/logout/"><i class="fa fa-sign-out" aria-hidden="true"></i> <fmt:message key="cancel"/></a>
						</li>
					</ul>
				</div>
			</div>
			<div class="layui-side layui-bg-black" id="admin-side">
				<div class="layui-side-scroll" id="admin-navbar-side" lay-filter="side"></div>
			</div>
			<div class="layui-body" style="bottom: 0;border-left: solid 2px #1AA094;" id="admin-body">
				<div class="layui-tab admin-nav-card layui-tab-brief" lay-filter="admin-tab">
					<ul class="layui-tab-title">
						<li class="layui-this">
							<i class="fa fa-home" aria-hidden="true"></i>
							<cite> <fmt:message key='sys.homepage'  /></cite>
						</li>
					</ul>
					<div class="layui-tab-content" style="min-height: 150px; padding: 5px 0 0 0;">
						<div class="layui-tab-item layui-show">
							<iframe src="${ctx}admin/jvm"></iframe>
						</div>
					</div>
				</div>
			</div>
			<div class="layui-footer footer footer-demo" id="admin-footer">
				<div class="layui-main">
					<p>2016 &copy;
						<a href="x"><fmt:message key="Securitization"/></a>
					</p>
				</div>
			</div>
			<div class="site-tree-mobile layui-hide">
				<i class="layui-icon">&#xe602;</i>
			</div>
			<div class="site-mobile-shade"></div> 
			
			<script type="text/javascript">
			var navs = [ {
				"title": "<fmt:message key='sys.operationSystemOverview'  />",
				"icon": "fa-dashboard",
				"href": ctx+"admin/jvm",
				"spread": false
			},{
				"title": "<fmt:message key='sys.operationUsersRole'  />",
				"icon": "fa-user",
				"spread": true,
				"children": 
				[
				{"title": "<fmt:message key='sys.operationUsers'  />","icon": "fa-users","href": ctx+"admin/adminuser"}
				, {"title": "<fmt:message key='sys.operationRole'  />","icon": "fa-cogs","href": ctx+"admin/adminrole"}
				, {"title": "<fmt:message key='sys.operationPrivilege'  />","icon": "fa-cog","href": ctx+"admin/adminauth"}
				]
			}, {
				"title": "<fmt:message key='member.systemSettings'/>",
				"icon": "fa-cogs",
				"spread": false,
				"children": 
				[
				  {"title": "<fmt:message key='member.basicSettings'/>","icon": "fa-bars","href": ctx+"admin/percent/index"}
				 , {"title": "<fmt:message key='Declaration.center.parameter.Settings'/>","icon": "fa-bars","href": ctx+"admin/declarationform"}
				 , {"title": "<fmt:message key='Static.bonus.parameter.Settings'/>","icon": "fa-cogs","href": ctx+"admin/staticrelease/index"}
				 , {"title": "<fmt:message key='Dynamic.bonus.parameter.Settings'/>","icon": "fa-bars","href": ctx+"admin/dynamic"}

				]
			}, {
				"title": "<fmt:message key='Member.management'/>",
				"icon": "fa-cubes",
				"spread": false,
				"children": 
				[
				 {"title": "<fmt:message key='Member.management'/>","icon": "fa-bars","href": ctx+"admin/member/index"} 
				 ,{"title": "<fmt:message key='Asset.management.subsidiary'/>","icon": "fa-bars","href": ctx+"admin/userAccount/index"}
				 ,{"title": "<fmt:message key='Pension.agency.details'/>","icon": "fa-bars","href": ctx+"admin/oldSecurity/index"} 
				 ,{"title": "<fmt:message key='education.fund.subsidiary'/>","icon": "fa-bars","href": ctx+"admin/memberEducationfund/index"} 
				 ,{"title": "<fmt:message key='securities.subsidiary'/>","icon": "fa-bars","href": ctx+"admin/menberNegotiablefund/index"} 
				 ,{"title": "<fmt:message key='Double.coupon.points.list'/>","icon": "fa-bars","href": ctx+"admin/menberRebuy/index"} 
				 ,{"title": "<fmt:message key='original.schedule.of.rights.and.interests'/>","icon": "fa-bars","href": ctx+"admin/menberSecurities/index"} 
				 ,{"title": "<fmt:message key='Fortune.securities.account'/>","icon": "fa-bars","href": ctx+"admin/menberStockcertificate/index"} 
				]
			}/* , {
				"title": "报表统计中心",
				"icon": "fa-cubes",
				"spread": false,
				"children": 
				[
				 {"title": "资产包售出统计报表","icon": "fa-bars","href": ctx+"admin/assetPackagingReport/index"} 
				 ,{"title": "充值统计报表","icon": "fa-bars","href": ctx+"admin/awardDetailReport/index"} 
				 ,{"title": "提现统计报表","icon": "fa-bars","href": ctx+"admin/awardDetailReport/index"} 
				 ,{"title": "手续费统计报表","icon": "fa-bars","href": ctx+"admin/awardDetailReport/index"} 
				]
			} */, {
				"title": "<fmt:message key='press.pressCenter'/>",
				"icon": "fa-cubes",
				"spread": false,
				"children": 
				[
				 {"title": "<fmt:message key='video.management'/>","icon": "fa-bars","href": ctx+"admin/newscenter/index"} 
				 ,{"title": "<fmt:message key='PDF.management'/>","icon": "fa-bars","href": ctx+"admin/pdfcenter/index"} 
				]
			}];
			 
			/** index.js By Beginner Emain:zheng_jinfan@126.com HomePage:http://www.zhengjinfan.cn */
			layui.config({
				base: 'assets/admin/js/'
			}).use(['element', 'layer', 'navbar', 'tab'], function() {
				var element = layui.element(),
					$ = layui.jquery,
					layer = layui.layer,
					navbar = layui.navbar(),
					tab = layui.tab({
						elem: '.admin-nav-card' //设置选项卡容器
					});
				//iframe自适应
				$(window).on('resize', function() {
					var $content = $('.admin-nav-card .layui-tab-content');
					$content.height($(this).height() - 147);
					$content.find('iframe').each(function() {
						$(this).height($content.height());
					});
				}).resize();

				//设置navbar
				navbar.set({
					elem: '#admin-navbar-side',
					data: navs
					/*cached:true,
					url: 'datas/nav.json'*/
				});
				//渲染navbar
				navbar.render();
				//监听点击事件
				navbar.on('click(side)', function(data) {
					//debugger;
					tab.tabAdd(data.field);
				});

				$('.admin-side-toggle').on('click', function() {
					var sideWidth = $('#admin-side').width();
					if(sideWidth === 200) {
						$('#admin-body').animate({
							left: '0'
						}); //admin-footer
						$('#admin-footer').animate({
							left: '0'
						});
						$('#admin-side').animate({
							width: '0'
						});
					} else {
						$('#admin-body').animate({
							left: '200px'
						});
						$('#admin-footer').animate({
							left: '200px'
						});
						$('#admin-side').animate({
							width: '200px'
						});
					}
				});

				//手机设备的简单适配
				var treeMobile = $('.site-tree-mobile'),
					shadeMobile = $('.site-mobile-shade');
				treeMobile.on('click', function() {
					$('body').addClass('site-mobile');
				});
				shadeMobile.on('click', function() {
					$('body').removeClass('site-mobile');
				});
			});
			
			layui.use('layer',function(){
				var $ = layui.jquery,
				layer = layui.layer;
				//$('#preview').on('click',function(){
				//	var index = layer.open({ type: 2, title: "<fmt:message key='Preview.front.page'/>", content: '<%=baseFullPath %>'});
				//	layer.full(index);
				//});
				
			});
			</script>
		</div>
	</body>

</html>
